package listener;

import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

/**
 * Application Lifecycle Listener implementation class SessionAttributeListener
 *
 */
@WebListener
public class SessionAttributeListener implements HttpSessionListener {

	public void attributeAdded(HttpSessionBindingEvent event) {
        System.out.println("属性增加：" + event.getName() + " = " + event.getValue());
    }
  
    public void attributeRemoved(HttpSessionBindingEvent event) {
        System.out.println("属性删除：" + event.getName() + " = " + event.getValue());
    }
  
    public void attributeReplaced(HttpSessionBindingEvent event) {
        System.out.println("属性替换：" + event.getName() + " = " + event.getValue());
    }
}